$(function () {
    $('.del').click(function (e) {
        var target = $(e.target)
        var id = target.data('id')
        var tr = $('.item_id_' + id)

        $.ajax({
            type: 'DELETE',
            url: '/admin/delete?id=' + id
        }).done(function (results) {
            if (results.success) {
                if (tr.length > 0) {
                    tr.remove()
                }
            }
        })
    })
})